home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Enigma Amiga Life 109
/
EnigmaAmiga109CD.iso
/
dalla rivista
/
amiga.free
/
sorgenti vari
/
wolfedit2 2.0.4 source.sit
/
WolfEdit2 2.0.4 Source
/
UEditOther.p
< prev
next >
Wrap
Text File
|
1995-10-16
|
2KB
|
82 lines
unit UEditOther;
interface
uses
UWolfDoc;
procedure EditOther (mapList: TMapListDoc);
implementation
uses
UEditArt;
const
otherEditDlogID = 137;
menuItem = 2;
imageItem = 3;
firstOtherBrgrID = 428;
type
TOtherEditDialog = object(TArtEditDialog)
procedure IOtherEditDialog (itsMapList: TMapListDoc);
procedure UninstallArt;
override;
procedure InstallArt;
override;
procedure ItemHit (var e: EventInfo; itemNo: integer);
override;
end;
procedure TOtherEditDialog.IOtherEditDialog (itsMapList: TMapListDoc);
begin
IArtEditDialog(otherEditDlogID, nil, itsMapList, false);
SelectArt(0);
end;
procedure TOtherEditDialog.UninstallArt;
begin
if (fCurrentArt >= 0) & (fArtView.fChanged) then begin
fMapList.InstallObjectArt(firstOtherBrgrID + fCurrentArt, fArtView.ExtractObject);
fArtView.fChanged := false;
end;
end;
procedure TOtherEditDialog.InstallArt;
begin
if fCurrentArt >= 0 then
fArtView.InstallObject(fMapList.GetObjectArt(firstOtherBrgrID + fCurrentArt));
end;
procedure TOtherEditDialog.ItemHit (var e: EventInfo; itemNo: integer);
begin
case itemNo of
menuItem:
SelectArt(GetItemValue(menuItem) - 1);
otherwise
inherited ItemHit(e, itemNo);
end;
end;
procedure EditOther (mapList: TMapListDoc);
var
dlog: TOtherEditDialog;
procedure CheckWindow (win: TWindow);
begin
if member(win, TOtherEditDialog) then begin
win.Select;
exit(EditOther);
end;
end;
begin
mapList.EachWindowDo(CheckWindow);
new(dlog);
dlog.IOtherEditDialog(mapList);
dlog.Show;
end;
end.